package com.gxa.table.controller;

import com.gxa.table.param.CCQSTParam;
import com.gxa.table.param.QTDDParam;
import com.gxa.table.service.TableService;
import dto.ResultDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author fengfeng
 * @version 1.0
 * @description: TODO
 * @date 2021-05-10 20:28
 */
@RestController
@RequestMapping("/table")
@Api(tags = "差旅报表模块接口")
public class TableController {

    @Autowired
    private TableService tableService;

    @PostMapping("/userAndOrderMsg")
    @ApiOperation(value = "用户信息", httpMethod = "POST")
    public ResultDTO userAndOrderMsg() {
        return tableService.userAndOrderMsg();
    }

    @PostMapping("/orderAndCityDistribute")
    @ApiOperation(value = "订单目的地城市分布", httpMethod = "POST")
    public ResultDTO orderAndCityDistribute() {
        return tableService.orderAndCityDistribute();
    }

    @PostMapping("/chuChaiQuShiTu")
    @ApiOperation(value = "出差信息趋势图", httpMethod = "POST")
    public ResultDTO chuChaiQuShiTu(@RequestBody CCQSTParam param) {
        return tableService.chuChaiQuShiTu(param);
    }

    @PostMapping("/qiTaDataDistribute")
    @ApiOperation(value = "其它数据", httpMethod = "POST")
    public ResultDTO qiTaDataDistribute(@RequestBody QTDDParam param) {
        return tableService.qiTaDataDistribute(param);
    }
}
